package com.ptu.spzx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ptu.spzx.domain.Exam.Exampaper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author YT
 * @since 2024-01-28
 */
@Mapper
public interface ExampaperMapper extends BaseMapper<Exampaper> {
    @Select("SELECT * FROM exampaper WHERE belong_course_id=#{courseId} AND ep_is_public=1")
    List<Exampaper> getExamPaperByCourseId(Integer courseId);

    @Select("SELECT ep_id from exam_exampaper WHERE exam_Id=#{examId}")
    List<Long> SelectByIds(Long examId);

}
